#!/bin/sh
systemctl restart sshd
systemctl start ntpd
#setenforce 0
umask 0022

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

if [ `grep -c "hostname=localhost" /etc/ambari-agent/conf/ambari-agent.ini` -ne '0' ];then
  sed -i  "s/hostname=localhost/hostname=$AMBARI_SERVER/" /etc/ambari-agent/conf/ambari-agent.ini
fi